From 00a02b0a94cccf86406564034a8d22cf57e179ed Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 31 Jul 2008 15:38:09 +0100 Subject: [PATCH] AMD IOMMU: spin_uinlock() on early return path. Signed-off-by: Wei Wang --- xen/drivers/passthrough/amd/iommu_init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/drivers/passthrough/amd/iommu_init.c b/xen/drivers/passthrough/amd/iommu_init.c index 3bd91adf70..0a2081fe39 100644 --- a/xen/drivers/passthrough/amd/iommu_init.c +++ b/xen/drivers/passthrough/amd/iommu_init.c @@ -477,7 +477,10 @@ void __init enable_iommu(struct amd_iommu *iommu) spin_lock_irqsave(&iommu->lock, flags); if ( iommu->enabled ) + { + spin_unlock_irqrestore(&iommu->lock, flags); return; + } iommu->dev_table.alloc_size = device_table.alloc_size; iommu->dev_table.entries = device_table.entries; -- 2.30.2